﻿namespace Glossary
{
    /// <summary>
    ///     Ansvar: Vikiet Chung
    /// </summary>
    public struct Word
    {
        private string _foreignWord;
        private string _swedishWord;
        private Language _foreignLanguage;
        private string _swedishDescription;
        private int _wordID;

        public string ForeignWord
        {
            get { return _foreignWord; }
            set { _foreignWord = value; }
        }
        public string SwedishWord
        {
            get { return _swedishWord; }
            set { _swedishWord = value; }
        }
        public string SwedishDescription
        {
            get { return _swedishDescription; }
            set { _swedishDescription = value; }
        }

        public Language ForeignLanguage
        {
            get { return _foreignLanguage; }
            set { _foreignLanguage = value; }
        }

        public int WordID
        {
            get { return _wordID; }
            set { _wordID = value; }
        }

        public Word(string foreignWord, string swedishWord, Language foreignlanguage)
            : this()
        {
            ForeignWord = foreignWord;
            SwedishWord = swedishWord;
            ForeignLanguage = foreignlanguage;
        }


        public Word(string foreignWord, string swedishWord, string swedishDescription, Language foreignlanguage)
            : this(foreignWord, swedishWord, foreignlanguage)
        {
            SwedishDescription = swedishDescription;
        }

        public Word(int wordID, string foreignWord, string swedishWord, string swedishDescription, Language foreignlanguage)
            : this(foreignWord, swedishWord, swedishDescription, foreignlanguage)
        {
            WordID = wordID;
        }


        public override string ToString()
        {
            return string.Format("{0}; {1}", ForeignWord, SwedishWord);
        }
    }
}